package com.laowang.project.system.service.impl;

import java.util.List;
                                                                    import com.laowang.common.utils.DateUtils;
            import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.MyLifeCircleReplyMapper;
import com.laowang.project.system.domain.MyLifeCircleReply;
import com.laowang.project.system.service.MyLifeCircleReplyService;

/**
 * 评论回复Service业务层处理
 *
 * @author laowang
 * @date 2023-04-27
 */
@Service
public class MyLifeCircleReplyServiceImpl implements MyLifeCircleReplyService {
    @Autowired
    private MyLifeCircleReplyMapper myLifeCircleReplyMapper;

    /**
     * 查询评论回复
     *
     * @param id 评论回复ID
     * @return 评论回复
     */
    @Override
    public MyLifeCircleReply selectMyLifeCircleReplyById(Integer id) {
        return myLifeCircleReplyMapper.selectMyLifeCircleReplyById(id);
    }

    /**
     * 查询评论回复列表
     *
     * @param myLifeCircleReply 评论回复
     * @return 评论回复
     */
    @Override
    public List<MyLifeCircleReply> selectMyLifeCircleReplyList(MyLifeCircleReply myLifeCircleReply) {
        return myLifeCircleReplyMapper.selectMyLifeCircleReplyList(myLifeCircleReply);
    }

    /**
     * 新增评论回复
     *
     * @param myLifeCircleReply 评论回复
     * @return 结果
     */
    @Override
    public int insertMyLifeCircleReply(MyLifeCircleReply myLifeCircleReply) {
                                                                                                                    myLifeCircleReply.setCreateTime(DateUtils.getNowDate());
                                                                                                                                                                        return myLifeCircleReplyMapper.insertMyLifeCircleReply(myLifeCircleReply);
    }

    /**
     * 修改评论回复
     *
     * @param myLifeCircleReply 评论回复
     * @return 结果
     */
    @Override
    public int updateMyLifeCircleReply(MyLifeCircleReply myLifeCircleReply) {
                                                                                                                                                                                                                                                                return myLifeCircleReplyMapper.updateMyLifeCircleReply(myLifeCircleReply);
    }

    /**
     * 批量删除评论回复
     *
     * @param ids 需要删除的评论回复ID
     * @return 结果
     */
    @Override
    public int deleteMyLifeCircleReplyByIds(Integer[] ids) {
        return myLifeCircleReplyMapper.deleteMyLifeCircleReplyByIds(ids);
    }

    /**
     * 删除评论回复信息
     *
     * @param id 评论回复ID
     * @return 结果
     */
    @Override
    public int deleteMyLifeCircleReplyById(Integer id) {
        return myLifeCircleReplyMapper.deleteMyLifeCircleReplyById(id);
    }
}
